package com.lidastudio.dbdatamock.dto;

import java.util.Arrays;

public class TableInfo {
	private String tableName;
	private Column[] columns;
	
	public TableInfo() {
		super();
	}

	public TableInfo(String tableName) {
		super();
		this.tableName = tableName;
	}

	public String getTableName() {
		return tableName;
	}


	public void setTableName(String tableName) {
		this.tableName = tableName;
	}


	public Column[] getColumns() {
		return columns;
	}


	public void setColumns(Column[] columns) {
		this.columns = columns;
	}


	@Override
	public String toString() {
		return "TableInfo [tableName=" + tableName + ", columns=" + Arrays.toString(columns) + "]";
	}


	public static class Column{
		public String name;
		public int dataType;
		public String size;
		public String isNullable;
		public String isAutoIncrement;
		
		public Column(String name, int dataType, String size, String isNullable, String isAutoIncrement) {
			super();
			this.name = name;
			this.dataType = dataType;
			this.size = size;
			this.isNullable = isNullable;
			this.isAutoIncrement = isAutoIncrement;
		}

		@Override
		public String toString() {
			return "Column [name=" + name + ", dataType=" + dataType + "]";
		}
	}
}
